import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    ColumnLayout {
        anchors.fill: parent

        TabBar {
            id: tabBar
            Layout.fillWidth: true

            TabButton { text: "Page1" }
            TabButton { text: "Page2" }
            TabButton { text: "Page3" }
        }

        StackLayout {
            Layout.fillWidth: true
            Layout.fillHeight: true
            currentIndex: tabBar.currentIndex

            Page{ Text{ anchors.centerIn: parent; text: "This is page1" } }
            Page{ Text{ anchors.centerIn: parent; text: "This is page2" } }
            Page{ Text{ anchors.centerIn: parent; text: "This is page3" } }
        }
    }
}
